package com.itheima.classabstrac;

import java.util.Scanner;

public class JuxXing extends ClassAbstract{
    private Scanner sc=new Scanner(System.in);
    @Override
    public double area() {
        double c,k;
        System.out.println("矩形的长:");
        c=sc.nextDouble();
        System.out.println("矩形的宽:");
        k=sc.nextByte();
        return k*c;
    }

    @Override
    public double zhouChang() {
        double c,k;
        System.out.println("矩形的长:");
        c=sc.nextDouble();
        System.out.println("矩形的宽:");
        k=sc.nextByte();
        return 2*(c+k);
    }
}
